//
//  ModelOfCountryData.m
//  FreeTravel
//
//  Created by 徐康 on 16/9/6.
//  Copyright © 2016年 KX. All rights reserved.
//

#import "ModelOfCountryData.h"
#import "ModelOfCountryHot_city.h"
#import "ModelOfCountryHot_mguide.h"
#import "ModelOfCountryNew_discount.h"
@implementation ModelOfCountryData
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    NSMutableArray *arr1 = [NSMutableArray array];
    NSMutableArray *arr2 = [NSMutableArray array];
    NSMutableArray *arr3 = [NSMutableArray array];
    NSMutableArray *arr4 = [NSMutableArray array];
    if ([key isEqualToString:@"id"]) {
        self.ID = value;
    }if ([key isEqualToString:@"planto"]) {
        self.planto = [value integerValue];
    }if ([key isEqualToString:@"beento"]) {
        self.beento = [value integerValue];
    }if ([key isEqualToString:@"guide_num"]) {
        self.guide_num = [value integerValue];
    }if ([key isEqualToString:@"hot_city"]) {
        for (NSDictionary *dic in value) {
            ModelOfCountryHot_city *model = [ModelOfCountryHot_city modelWithDic:dic];
            [arr1 addObject:model];
        }
        self.hot_city = arr1;
        
    }if ([key isEqualToString:@"hot_mguide"]) {
        for (NSDictionary *dic in value) {
            ModelOfCountryHot_mguide *model = [ModelOfCountryHot_mguide modelWithDic:dic];
            [arr2 addObject:model];
        }
        self.hot_mguide = arr2;
    }if ([key isEqualToString:@"new_discount"]) {
        for (NSDictionary *dic in value) {
            ModelOfCountryNew_discount *model = [ModelOfCountryNew_discount modelWithDic:dic];
            [arr3 addObject:model];
        }
        self.New_discount = arr3;
    }if ([key isEqualToString:@"photos"]) {
        for (NSString *str in value) {
            [arr4 addObject:str];
        }
        self.photos  = arr4;
    }
}
@end
